Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add (across) and (for), for consuming/looping over streams in parallel #148

Merged
merged 2 commits into from
Apr 17, 2022

Conversation

vito
Copy link
Owner

@vito vito commented Apr 17, 2022

not 1000% sure about the names for these.

(across) takes multiple streams and returns a single stream that returns values read from each stream. can be used for independent triggers in a pipeline. it doesn't skip values on individual streams, but it also doesn't produce every permutation.

(for) is syntax sugar for iterating over multiple streams.

(for [even (list->source [0 2 4])
      odd (list->source [1 3 5])]
  (logf "for: %d %d" even odd))

building blocks for pipelines!

not 1000% sure about the names for these.

(across) takes multiple streams and returns a single stream that returns
values read from each stream. can be used for independent triggers in a
pipeline. it doesn't skip values on individual streams, but it also
doesn't produce every permutation.

(for) is syntax sugar for iterating over multiple streams.

  (for [even (list->source [0 2 4])
        odd (list->source [1 3 5])]
    (logf "for: %d %d" even odd))

building blocks for pipelines!
@vito vito added the enhancement New feature or request label Apr 17, 2022
@vito vito merged commit 6b17a73 into main Apr 17, 2022
@vito vito deleted the add-across-and-for branch April 17, 2022 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant